<template>
  <div>
    1111
<!--    <el-dialog  :visible.sync="visiable" width="30%" :before-close="handleClose">
      <el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange">
        <el-checkbox v-for="city in cities" :label="city" :key="city">{{city}}</el-checkbox>
      </el-checkbox-group>
    </el-dialog>-->
  </div>
</template>

<script>
import blogApi from '@/api/blog';
const cityOptions = ['上海', '北京', '广州', '深圳'];
export default {
  props:{
    categoryId: null,  // 分类id
    visiable:{  // 弹出窗口
      type:Boolean,
      default:false
    },
    /*formData: { // 提交表单数据
      type:Object,
      default:{}
    },*/
    labels: [],
    remoteClose: Function, //用于关闭窗口
  },
  data() {
    return {
      checkAll: false,
      checkedCities: ['上海', '北京'],
      cities: cityOptions,
      isIndeterminate: true
    };
  },
  methods: {
    handleCheckAllChange(val) {
      this.checkedCities = val ? cityOptions : [];
      this.isIndeterminate = false;
    },

    handleCheckedCitiesChange(value) {
      let checkedCount = value.length;
      this.checkAll = checkedCount === this.cities.length;
      this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;
    },

    // 关闭窗口
    handleClose() {
      // 调用父组件的方法关闭窗口
      // this.formData.name = '';
      this.remoteClose();
    },
  }
}
</script>

<style scoped>

</style>
